from nicegui import ui ,app
from page_layout import page_layout
from config import static_file

import sys
from config import initial_set
# sys.stdout = open("mylog.txt", "w", encoding="utf8")
# sys.stderr = open("myerr.txt", "w", encoding="utf8")


# 初始化程序
initial_set.init_app()

# 加载网页路由
page_layout()

# 加载静态文件
app.add_static_files('/static',static_file)


ui.run(
        reload=False,    
        native=True,
        window_size=(1400,865),
        title='段福的工具箱~配置解析',
        language='zh-CN',
        favicon='🚀',
        # uvicorn_logging_level='info'
        )

